import java.util.Scanner;

public class Exercise {
    public static void main(String[] args) {
        Scanner scanner =new Scanner(System.in);
        int a=scanner.nextInt();
        int b=scanner.nextInt();
        if(b%a==0){
            System.out.println("最小公约数："+a);
        }else{
            System.out.println("最小公约数为1");
        }
    }
}
